<!DOCTYPE html>

<html lang="en">

<head>

    {include file="public/meta" /}

    {include file="public/link" /}

    {include file="public/form" /}

</head>

<body data-type="index" class="theme-white">

<div class="am-g tpl-g">

    {include file="public/header" /}

    {include file="public/left" /}

    {include file="public/content_top" /}

    <ol class="am-breadcrumb" style="    margin-bottom: 0;">

        <li><a href="../home/index.html" class="am-icon-home">首页</a></li>

        <li><a href="#">参数管理</a></li>

        <li class="am-active">等级参数修改</li>

    </ol>

    <div class="widget am-cf">

        <form class="am-cf" id="form" onsubmit="return false">

            <div class="am-panel am-panel-primary">

                <div class="am-panel-hd">修改等级</div>

                <div class="am-panel-bd">
 
                    <div class="am-form-group">

                        <span class="s1">等级名称：</span>

                        <label class="am-form-label">

                            <input type="text" id="desc" class="am-form-field am-input-sm" 

                                   value="{$list.name}" name="name" />

                        </label>

                    </div>
                    <div class="am-form-group">

                        <span class="s1">分成(三级以内写小数)：</span>

                        <label class="am-form-label">

                            <input type="text"  class="am-form-field am-input-sm" name="fencheng"

                                   value="{$list.fencheng}"/>

                        </label>

                    </div>
                    <div class="am-form-group">

                        <span class="s1">提成(三级以外写小数):</span>

                        <label class="am-form-label">

                            <input type="text" class="am-form-field am-input-sm" name="ticheng"

                                   value="{$list.ticheng}"/>

                        </label>

                    </div>
                    
                    
                    <div class="am-form-group">

                        <span class="s1">购买升级条件(物品名字):</span>

                        <label class="am-form-label">

                            <input type="text" class="am-form-field am-input-sm" name="buytj"

                                   value="{$list.buytj}"/>

                        </label>

                    </div>
                    <div class="am-form-group">

                        <span class="s1">团队算力升级条件:</span>

                        <label class="am-form-label">

                            <input type="text" class="am-form-field am-input-sm" name="suanli"

                                   value="{$list.suanli}"/>

                        </label>

                    </div>
                    <input type="hidden" class="am-form-field am-input-sm" name="id" value="{$list.id}"/>
                    <div class="am-panel-bd" style="padding-bottom: 1rem;margin-left: 13rem">

                        <button type="submit" class="am-btn am-btn-primary am-btn-sm" onclick="sub() ">确定</button>

                        <a href="level.html" class="am-btn am-btn-secondary am-btn-sm">返回</a>

                    </div>

                </div>

            </div>

        </form>

    </div>

</div>

{include file="public/foot" /}

<script type="text/javascript" src="/static/ajaxupload.js"></script>

<script type="text/javascript">

    $(function () {

        var nav = $('.left-sidebar li.sidebar-nav-link');

        nav.removeClass("active");
        nav.eq({$a}).find('ul').show();
        nav.eq({$a}).find('ul li').eq({$b}).find('a').addClass('active');

    });
    function sub() {
        var arr = parseFormJson("#form");
        $.ajax({
            url: "{:url('System/edit_add')}",
            data: {arr: arr},
            type: "post",
            success: function (r) {
                if (r['code'] == 1) {
                    alert_open(r['msg'])
                } else {
                    alert_msg(r['msg']);
                }
            }
        });
    }
</script>

</body>

</html>